const sequelize = require('../DB/db');
const Sequelize = require('sequelize');

const User = sequelize.define('t_user', {
    fid: {
        type: Sequelize.STRING,
        field: 'f_id',
        primaryKey: true
    },
    fLoginName: {
        type: Sequelize.STRING,
        field: 'f_user_name'
    },
    fNickname: {
        type: Sequelize.STRING,
        field: 'f_nickname'
    },
    fName: {
        type: Sequelize.STRING,
        field: 'f_name'
    },
    fPassword: {
        type: Sequelize.STRING,
        field: 'f_password'
    },
    fPhoneNumber: {
        type: Sequelize.STRING,
        field: 'f_phone_number'
    },
    fPic: {
        type: Sequelize.STRING,
        field: 'f_pic'
    },
    fCreateTime: {
        type: Sequelize.DATE,
        field: 'f_creat_time'
    },
    fUpdateTime: {
        type: Sequelize.DATE,
        field: 'f_update_time'
    },
}, {
    freezeTableName: true,
    createdAt: 'fCreateTime',
    updatedAt: 'fUpdateTime'
})

module.exports = User